
import Controller.*;
import View.*;
import java.util.logging.*;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author admin-pc
 */
public class UpdateBookStatusMenuCommand implements Command {

    BookController bookController;

    private static Logger log = Logger.getLogger(AddAuthorMenuCommand.class.getName());

    public UpdateBookStatusMenuCommand(BookController bookController) {
        this.bookController = bookController;
    }

    @Override
    public void execute() {
        System.out.println("Введите ID:");
        int bookID = View.readPressSymbolInt();
        System.out.println("Введите статус:");
        String bookStatus = View.readPressSymbolStr();
        try {
            bookController.bookUpdateStatus(bookID, bookStatus);
        }
        catch (Exception e) {
            log.log(Level.SEVERE, "Exception: ", e);
        }
    }

}
